<template>
	<view class="u-flex-1">
		<u-input inputAlign="right" placeholder="请选择" v-model="bookTime" type="select" @click="show=true" />
		<u-picker v-model="show" :end-year="endYear" mode="time" :params="params" @confirm="confirm"></u-picker>
	</view>
</template>

<script setup>
	const params = {
		year: true,
		month: true,
		day: true,
		hour: true,
		minute: true,
		second: false
	}
	const endYear = new Date().getFullYear()
	const deliveryTime = ref(null)
	const bookTime = defineModel()

	const show = ref(false)

	function confirm(e) {
		bookTime.value = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':00'
	}
</script>

<style>

</style>